/**
 * 
 */
package com.toncen.samepms.fisher.condition;

import com.sky.fisher.condition.AbstractCondition;
import com.sky.fisher.condition.ConditionEnum;
import com.sky.fisher.model.CommonColumnModel;

/**
 * 字符类型枚举相等查询条件
 * 
 * @author tch
 * 
 */
public class EnumStringEqualsCondition extends AbstractCondition {

	public EnumStringEqualsCondition() {
		super(ConditionEnum.STRING_EQULAS);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.sky.fisher.filter.AbstractCondition#getConditionSQL(com.sky.fisher.model.CommonColumnModel,
	 *      java.lang.String)
	 */
	public String getConditionSQL(CommonColumnModel column, String value) throws Exception {
		StringBuffer conditionSQL = new StringBuffer();
		conditionSQL.append(" ");
		conditionSQL.append("AND");
		conditionSQL.append(" ");
		conditionSQL.append(column.getField());
		conditionSQL.append("=");
		conditionSQL.append("'");
		conditionSQL.append(value);
		conditionSQL.append("'");
		conditionSQL.append(" ");
		return conditionSQL.toString();
	}

}
